Always use BablFishPath's for accepted conversions. The path
authorØyvind Kolås <ok@src.gnome.org>
Sun, 20 Jan 2008 22:26:08 +0000 (22:26 +0000)
committerØyvind Kolås <ok@src.gnome.org>
Sun, 20 Jan 2008 22:26:08 +0000 (22:26 +0000)
construction code is the location of the regression test, an
earlier (now unneeded) optimization allowed using the first
and best conversion available. The (not in bugzilla afair) bug
manifest by this depended on the order of .so's on the file system
to manifest itself.
* babl/babl-fish.c: (go_fishing): only accepts paths when we go
fishing for existing conversions.
(babl_fish): elaborated a comment about why we avoid shortcut
conversions and only paths.

svn path=/trunk/; revision=275

ChangeLog
babl/babl-fish.c

index 0591e282d8e8e6ea368b1240d957963e0f17cfa9..74324d49663bdd8b32aded372dbc03df2ccc21a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-01-20  Øyvind Kolås  <pippin@gimp.org>
+
+       Always use BablFishPath's for accepted conversions. The path
+       construction code is the location of the regression test, an
+       earlier (now unneeded) optimization allowed using the first
+       and best conversion available. The (not in bugzilla afair) bug
+       manifest by this depended on the order of .so's on the file system
+       to manifest itself.
+
+       * babl/babl-fish.c: (go_fishing): only accepts paths when we go
+       fishing for existing conversions.
+       (babl_fish): elaborated a comment about why we avoid shortcut
+       conversions and only paths.
+
 2008-01-17  Øyvind Kolås  <pippin@gimp.org>
 
        Applied patch from Deji Akingunola <dakingun@gmail.com> to make babl
index 79769121f1c97bd6a79378b9fe93c6ee6e362bf4..d0c148fd8b9e161121c9af8185f2994461ba185e 100644 (file)
@@ -67,8 +67,8 @@ go_fishing (const Babl *source,
       Babl *item = db->items[i];
       if ((void *) source == (void *) item->fish.source &&
           (void *) destination == (void *) item->fish.destination &&
-          (item->class_type != BABL_FISH_REFERENCE ||
-           source == destination)
+          (item->class_type == BABL_FISH_PATH || /* accept only paths */
+           source == destination)                /* or memcpy */
           )
         {
           return item;
@@ -128,7 +128,9 @@ babl_fish (const void *source,
   }
 
   if (0) /* do not accept shortcut conversions, since there might be
-            a faster path
+            a faster path, besides the shortcut conversion might
+            have a too large error, let's rely on the paths for
+            error checking.
           */
     {
       Babl *shortcut_conversion;